//
//  lxGoodsEntity.m
//  luodansc
//
//  Created by 倫 星 on 2012/10/05.
//  Copyright (c) 2012年 方正株式会社. All rights reserved.
//

#import "lxGoodsDetailEntity.h"
#import "lxStringUtility.h"

@implementation lxGoodsDetailEntity

@synthesize goods_id = _goods_id;
@synthesize cat_id = _cat_id;
@synthesize goods_sn = _goods_sn;
@synthesize goods_name = _goods_name;
@synthesize goods_name_style = _goods_name_style;
@synthesize click_count = _click_count;
@synthesize brand_id = _brand_id;
@synthesize provider_name = _provider_name;
@synthesize goods_number = _goods_number;
@synthesize goods_weight = _goods_weight;
@synthesize market_price = _market_price;
@synthesize shop_price = _shop_price;
@synthesize promote_price = _promote_price;
@synthesize promote_start_date = _promote_start_date;
@synthesize promote_end_date = _promote_end_date;
@synthesize warn_number = _warn_number;
@synthesize keywords = _keywords;
@synthesize goods_brief = _goods_brief;
@synthesize goods_desc = _goods_desc;
@synthesize goods_thumb = _goods_thumb;
@synthesize goods_img = _goods_img;
@synthesize original_img = _original_img;
@synthesize is_real = _is_real;
@synthesize extension_code = _extension_code;
@synthesize is_on_sale = _is_on_sale;
@synthesize is_alone_sale = _is_alone_sale;
@synthesize is_shipping = _is_shipping;
@synthesize integral = _integral;
@synthesize add_time = _add_time;
@synthesize sort_order = _sort_order;
@synthesize is_delete = _is_delete;
@synthesize is_best = _is_best;
@synthesize is_new = _is_new;
@synthesize is_hot = _is_hot;
@synthesize is_promote = _is_promote;
@synthesize bonus_type_id = _bonus_type_id;
@synthesize last_update = _last_update;
@synthesize goods_type = _goods_type;
@synthesize seller_note = _seller_note;
@synthesize give_integral = _give_integral;
@synthesize rank_integral = _rank_integral;
@synthesize suppliers_id = _suppliers_id;
@synthesize is_check = _is_check;
@synthesize measure_unit = _measure_unit;
@synthesize goods_brand = _goods_brand;
@synthesize bonus_money = _bonus_money;
@synthesize comment_rank_img = _comment_rank_img;
@synthesize rank_price = _rank_price;
@synthesize promote_price_org = _promote_price_org;
@synthesize gmt_end_time = _gmt_end_time;

- (id)init {
	self = [super init];
	if (self != nil) {
        _goods_id = 0;
        _cat_id = 0;
        _goods_sn = nil;
        _goods_name = nil;
        _goods_name_style = nil;
        _click_count = 0;
        _brand_id = 0;
        _provider_name = nil;
        _goods_number = 0;
        _goods_weight = 0.0f;
        _market_price = 0.0f;
        _shop_price = 0.0f;
        _promote_price = 0.0f;
        _promote_start_date = 0;
        _promote_end_date = 0;
        _warn_number = 0;
        _keywords = nil;
        _goods_brief = nil;
        _goods_desc = nil;
        _goods_thumb = nil;
        _goods_img = nil;
        _original_img = nil;
        _is_real = 0;
        _extension_code = nil;
        _is_on_sale = NO;
        _is_alone_sale = NO;
        _is_shipping = NO;
        _integral = 0;
        _add_time = nil;
        _sort_order = 0;
        _is_delete = YES;
        _is_best = NO;
        _is_new = NO;
        _is_hot = NO;
        _is_promote = NO;
        _bonus_type_id = 0;
        _last_update = nil;
        _goods_type = 0;
        _seller_note = nil;
        _give_integral = 0;
        _rank_integral = 0;
        _suppliers_id = 0;
        _is_check = NO;
        _comment_rank_img = nil;
	}
	return self;
}

- (BOOL)setEntity:(NSDictionary *)dictionary {
    BOOL result = [super setEntity:dictionary];
    if (NO == result) {
        return NO;
    }
    
    _goods_id = [[dictionary objectForKey:@"goods_id"] intValue];
    _cat_id = [[dictionary objectForKey:@"cat_id"] intValue];
    _goods_sn = [lxStringUtility nil2String:[dictionary objectForKey:@"goods_sn"]];
    _goods_name = [lxStringUtility nil2String:[dictionary objectForKey:@"goods_name"]];
    [_goods_name retain];
    _goods_name_style = [lxStringUtility nil2String:[dictionary objectForKey:@"goods_name_style"]];
    _click_count = [[dictionary objectForKey:@"click_count"] intValue];
    _brand_id = [[dictionary objectForKey:@"brand_id"] intValue];
    _provider_name = [lxStringUtility nil2String:[dictionary objectForKey:@"provider_name"]];
    _goods_number = [[dictionary objectForKey:@"goods_number"] intValue];
    _goods_weight = [[dictionary objectForKey:@"goods_weight"] floatValue];
    _market_price = [[dictionary objectForKey:@"market_price"] floatValue];
    _shop_price = [[dictionary objectForKey:@"shop_price"] floatValue];
    _promote_price = [[dictionary objectForKey:@"promote_price"] floatValue];
    _promote_start_date = [[dictionary objectForKey:@"promote_start_date"] intValue];
    _promote_end_date = [[dictionary objectForKey:@"promote_end_date"] intValue];
    _warn_number = [[dictionary objectForKey:@"warn_number"] intValue];
    _keywords = [lxStringUtility nil2String:[dictionary objectForKey:@"keywords"]];
    _goods_brief = [lxStringUtility nil2String:[dictionary objectForKey:@"goods_brief"]];
    _goods_desc = [lxStringUtility nil2String:[dictionary objectForKey:@"goods_desc"]];
    _goods_thumb = [lxStringUtility nil2String:[dictionary objectForKey:@"goods_thumb"]];
    _goods_img = [lxStringUtility nil2String:[dictionary objectForKey:@"goods_img"]];
    [_goods_img retain];
    _original_img = [lxStringUtility nil2String:[dictionary objectForKey:@"original_img"]];
    _is_real = [[dictionary objectForKey:@"is_real"] intValue];
    _extension_code = [lxStringUtility nil2String:[dictionary objectForKey:@"extension_code"]];
    _is_on_sale = [[dictionary objectForKey:@"is_on_sale"] boolValue];
    _is_alone_sale = [[dictionary objectForKey:@"is_alone_sale"] boolValue];
    _is_shipping = [[dictionary objectForKey:@"is_shipping"] boolValue];
    _integral = [[dictionary objectForKey:@"integral"] intValue];
    _add_time = [lxStringUtility nil2String:[dictionary objectForKey:@"add_time"]];
    _sort_order = [[dictionary objectForKey:@"sort_order"] intValue];
    _is_delete = [[dictionary objectForKey:@"is_delete"] boolValue];
    _is_best = [[dictionary objectForKey:@"is_best"] boolValue];
    _is_new = [[dictionary objectForKey:@"is_new"] boolValue];
    _is_hot = [[dictionary objectForKey:@"is_hot"] boolValue];
    _is_promote = [[dictionary objectForKey:@"is_promote"] boolValue];
    _bonus_type_id = [[dictionary objectForKey:@"bonus_type_id"] intValue];
    _last_update = [lxStringUtility nil2String:[dictionary objectForKey:@"last_update"]];
    _goods_type = [[dictionary objectForKey:@"goods_type"] intValue];
    _seller_note = [lxStringUtility nil2String:[dictionary objectForKey:@"seller_note"]];
    _give_integral = [[dictionary objectForKey:@"give_integral"] intValue];
    _rank_integral = [[dictionary objectForKey:@"rank_integral"] intValue];
    _suppliers_id = [[dictionary objectForKey:@"suppliers_id"] intValue];
    _is_check = [[dictionary objectForKey:@"is_check"] boolValue];
    _measure_unit = [lxStringUtility nil2String:[dictionary objectForKey:@"measure_unit"]];
    _goods_brand = [lxStringUtility nil2String:[dictionary objectForKey:@"goods_brand"]];
    _bonus_money = [[dictionary objectForKey:@"bonus_money"] floatValue];
    _comment_rank_img = [lxStringUtility nil2String:[dictionary objectForKey:@"comment_rank_img"]];
    _rank_price = [[dictionary objectForKey:@"rank_price"] floatValue];
    _promote_price_org = [[dictionary objectForKey:@"promote_price_org"] floatValue];
    _gmt_end_time = [[dictionary objectForKey:@"gmt_end_time"] intValue];
    return YES;
}

@end
